package com.fivefu.core.hillstone.dto.response;

import com.fivefu.core.hillstone.entity.DbHillstoneDevice;

/**
 * 编码设备节点信息
 */
public class EquipmentInfoDto {

    /**
     * 设备唯一标识
     */
    private String deviceCode;

    /**
     * 设备名称
     */
    private String deviceName;

    /**
     * 厂商
     */
    private String deviceManufacturer;

    /**
     * Ip地址
     */
    private String deviceIp;

    /**
     * 端口号
     */
    private int devicePort;

    /**
     * 用户名
     */
    private String loginName;

    /**
     * 协议类型
     */
    private String protocolType;

    /**
     * 添加类型
     */
    private String addType;

    /**
     * 设备类型
     */
    private String deviceType;

    /**
     * 设备型号
     */
    private String deviceModel;

    //并未返回信息字段

    /**
     * 设备序列号
     */
    private String deviceSn;

    /**
     * 备注信息，用户自定义
     */
    private String memo;

    /**
     * 设备主动注册时的设备编号，只有当协议类型是主动注册时才有效
     */
    private String registDeviceCode;

    /**
     * 设备归属组织节点编码
     */
    private String orgCode;

    /**
     * 设备组织节点名称
     */
    private String orgName;

    /**
     * 设备在线状态
     */
    private String stat;

    /**
     * 设备所属的VAL域，该值为域ID
     */
    private String regionId;

    /**
     * 所属域的域名称
     */
    private String regionName;

    /**
     * 设备在VAL域内的ID
     */
    private String regionDeviceId;

    /**
     * 设备大类
     */
    private String deviceCategory;

    /**
     * 设备所在的平台编号
     */
    private int domainId;

    /**
     * 媒体端口
     */
    private int mediaPort;

    /**
     * 设备网关
     */
    private int deviceGateway;

//    /**
//     * 编码单元
//     */
//    private Object encoderUnit;
//
//    /**
//     * 解码单元
//     */
//    private Object decoderUnit;
//
//    /**
//     * 报警输入单元
//     */
//    private Object alarmInputUnit;
//
//    /**
//     * 报警输出单元
//     */
//    private Object alarmOutputUnit;
//
//    /**
//     * 大屏输入单元
//     */
//    private Object screenInputUnit;
//
//    /**
//     * 大屏输出单元
//     */
//    private Object screenOutputUnit;
//
//    /**
//     * 门禁单元
//     */
//    private Object accessControlUnit;
//
//    /**
//     * 语音单元
//     */
//    private Object devAudioUnit;
//
//    /**
//     * mac单元
//     */
//    private Object macUnit;
//
//    /**
//     * rfid单元
//     */
//    private Object rfidUnit;

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getDeviceIp() {
        return deviceIp;
    }

    public void setDeviceIp(String deviceIp) {
        this.deviceIp = deviceIp;
    }

    public int getDevicePort() {
        return devicePort;
    }

    public void setDevicePort(int devicePort) {
        this.devicePort = devicePort;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getProtocolType() {
        return protocolType;
    }

    public void setProtocolType(String protocolType) {
        this.protocolType = protocolType;
    }

    public String getAddType() {
        return addType;
    }

    public void setAddType(String addType) {
        this.addType = addType;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getDeviceModel() {
        return deviceModel;
    }

    public void setDeviceModel(String deviceModel) {
        this.deviceModel = deviceModel;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getRegistDeviceCode() {
        return registDeviceCode;
    }

    public void setRegistDeviceCode(String registDeviceCode) {
        this.registDeviceCode = registDeviceCode;
    }

    public String getDeviceManufacturer() {
        return deviceManufacturer;
    }

    public void setDeviceManufacturer(String deviceManufacturer) {
        this.deviceManufacturer = deviceManufacturer;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getStat() {
        return stat;
    }

    public void setStat(String stat) {
        this.stat = stat;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public String getRegionDeviceId() {
        return regionDeviceId;
    }

    public void setRegionDeviceId(String regionDeviceId) {
        this.regionDeviceId = regionDeviceId;
    }

    public String getDeviceCategory() {
        return deviceCategory;
    }

    public void setDeviceCategory(String deviceCategory) {
        this.deviceCategory = deviceCategory;
    }

    public int getDomainId() {
        return domainId;
    }

    public void setDomainId(int domainId) {
        this.domainId = domainId;
    }

    public int getMediaPort() {
        return mediaPort;
    }

    public void setMediaPort(int mediaPort) {
        this.mediaPort = mediaPort;
    }

    public int getDeviceGateway() {
        return deviceGateway;
    }

    public void setDeviceGateway(int deviceGateway) {
        this.deviceGateway = deviceGateway;
    }

//    public Object getEncoderUnit() {
//        return encoderUnit;
//    }
//
//    public void setEncoderUnit(Object encoderUnit) {
//        this.encoderUnit = encoderUnit;
//    }
//
//    public Object getDecoderUnit() {
//        return decoderUnit;
//    }
//
//    public void setDecoderUnit(Object decoderUnit) {
//        this.decoderUnit = decoderUnit;
//    }
//
//    public Object getAlarmInputUnit() {
//        return alarmInputUnit;
//    }
//
//    public void setAlarmInputUnit(Object alarmInputUnit) {
//        this.alarmInputUnit = alarmInputUnit;
//    }
//
//    public Object getAlarmOutputUnit() {
//        return alarmOutputUnit;
//    }
//
//    public void setAlarmOutputUnit(Object alarmOutputUnit) {
//        this.alarmOutputUnit = alarmOutputUnit;
//    }
//
//    public Object getScreenInputUnit() {
//        return screenInputUnit;
//    }
//
//    public void setScreenInputUnit(Object screenInputUnit) {
//        this.screenInputUnit = screenInputUnit;
//    }
//
//    public Object getScreenOutputUnit() {
//        return screenOutputUnit;
//    }
//
//    public void setScreenOutputUnit(Object screenOutputUnit) {
//        this.screenOutputUnit = screenOutputUnit;
//    }
//
//    public Object getAccessControlUnit() {
//        return accessControlUnit;
//    }
//
//    public void setAccessControlUnit(Object accessControlUnit) {
//        this.accessControlUnit = accessControlUnit;
//    }
//
//    public Object getDevAudioUnit() {
//        return devAudioUnit;
//    }
//
//    public void setDevAudioUnit(Object devAudioUnit) {
//        this.devAudioUnit = devAudioUnit;
//    }
//
//    public Object getMacUnit() {
//        return macUnit;
//    }
//
//    public void setMacUnit(Object macUnit) {
//        this.macUnit = macUnit;
//    }
//
//    public Object getRfidUnit() {
//        return rfidUnit;
//    }
//
//    public void setRfidUnit(Object rfidUnit) {
//        this.rfidUnit = rfidUnit;
//    }

    @Override
    public String toString() {
        return "EquipmentInfoDto{" +
                "deviceCode='" + deviceCode + '\'' +
                ", deviceIp='" + deviceIp + '\'' +
                ", devicePort=" + devicePort +
                ", loginName='" + loginName + '\'' +
                ", protocolType='" + protocolType + '\'' +
                ", addType='" + addType + '\'' +
                ", deviceType='" + deviceType + '\'' +
                ", deviceModel='" + deviceModel + '\'' +
                ", deviceName='" + deviceName + '\'' +
                ", deviceSn='" + deviceSn + '\'' +
                ", memo='" + memo + '\'' +
                ", registDeviceCode='" + registDeviceCode + '\'' +
                ", deviceManufacturer='" + deviceManufacturer + '\'' +
                ", orgCode='" + orgCode + '\'' +
                ", orgName='" + orgName + '\'' +
                ", stat='" + stat + '\'' +
                ", regionId='" + regionId + '\'' +
                ", regionName='" + regionName + '\'' +
                ", regionDeviceId='" + regionDeviceId + '\'' +
                ", deviceCategory='" + deviceCategory + '\'' +
                ", domainId=" + domainId +
                ", mediaPort=" + mediaPort +
                ", deviceGateway=" + deviceGateway +
//                ", encoderUnit=" + encoderUnit +
//                ", decoderUnit=" + decoderUnit +
//                ", alarmInputUnit=" + alarmInputUnit +
//                ", alarmOutputUnit=" + alarmOutputUnit +
//                ", screenInputUnit=" + screenInputUnit +
//                ", screenOutputUnit=" + screenOutputUnit +
//                ", accessControlUnit=" + accessControlUnit +
//                ", devAudioUnit=" + devAudioUnit +
//                ", macUnit=" + macUnit +
//                ", rfidUnit=" + rfidUnit +
                '}';
    }

    /**
     * 格式化设备实体类
     */
    public DbHillstoneDevice formartHillstoneDevice() {
        DbHillstoneDevice device = new DbHillstoneDevice();
        device.setDeviceCode(this.deviceCode);//设备编码
        device.setDeviceName(this.deviceName);//设备名称
        device.setDeviceManufacturer(this.deviceManufacturer);//厂商
        device.setDeviceIp(this.deviceIp);//设备IP
        device.setDevicePort(this.devicePort);//端口号
        device.setLoginName(this.loginName);//用户名
        device.setProtocolType(this.protocolType);//协议类型
        device.setAddType(this.addType);//添加类型
        device.setDeviceType(this.deviceType);//设备类型
        device.setDeviceModel(this.deviceModel);//设备型号
        return device;
    }
}
